<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        /* function func(arg) {
                                                    let arg;
                                                }
                                                func() // 报错
                                        */
        function func(arg) {
            {
                let arg;
                arg = 123;
                console.log(arg);
            }
        }
        func() // 不报错
    </script>
</body>

</html>